﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsGame1
{
    class StateParallel : State
    {
        public List<State> states = new List<State>();

        public StateParallel(Alien alien)
            : base(alien)
        {

        }

        public StateParallel(Alien alien, State [] ss )
            : base(alien)
        {
            foreach (State s in ss)
            {
                states.Add(s);
            }
        }

        public override bool Update(Timer t)
        {
            bool ret = false;
            foreach (State state in states)
            {
                bool b = state.Update(t);
                ret |= b;
            }
            return ret;
        }

    }
}
